import { useWidgetType } from '@/components/storybook/hooks/useTransform'


const base = process.env.NODE_ENV === 'development' ? 'https://intoss.mspbots.ai/bots/apps/' : 'https://oss.mspbots.ai/app/mspbots_theme_icon/paywall_backdrop_bg/'

export const widgetMasks = {
  cardnumbergadget: 'card_number',
  usertimezoneinfocardgadget: '',
  processgaugegadget: 'process_tracker',
  homepagegadget: '',
  scattergadget: 'scatter',
  pvtablegadget: 'pivot_table',
  scorecardgadget: 'line_chart',
  htmleditorgadget: 'html',
  drilldowntreemapgadget: 'treemap',
  barchartgadget: 'bar_chart',
  charthourglassgadget: 'hierarchy_grid',
  autorefreshgadget: '',
  pageheadergadget: '',
  pageheadergadgetnexticket: '',
  appstabsgadget: '',
  customizedmultiselectgadget: '',
  cardicon: '',
  placeholdergadget: '',
  cardlablegadget: '',
  kpigadget: '',
  multiselectgadget: '',
  cardlinegadget: 'line_chart',
  chartgadget: 'line_chart',
  piechartgadget: 'pie_chart',
  checkboxgadget: '',
  circulargauge: '',
  dateSlicer: '',
  dateRangeSlicer: '',
  dropdownlistgadget: '',
  enterinputgadget: '',
  cascadergadget: '',
  customizeduserdropdownlistgadget: '',
  grid: 'gird',
  gridgadget: 'gird',
  checklistgadget: 'checklist',
  hierarchygridgadget: 'hierarchy_grid',
  crudformgadget: 'crud_form',
  formviewdatagadget: 'crud_form',
  kanbangadget: '',
  customizedbotdetailinfogadget: '',
  customizedbotdetailrunhistorygadget: '',
  attendancegadget: '',
  treegridgadget: 'tree_grid',
  jugglegadget: '',
  recordgadget: '',
  usergadget: '',
  botsgadget: '',
  workschedulegadget: '',
  bar3dchartgadget: 'transparent_bar3d',
  litikugadget: 'litikugadget',
  radarchartgadget:'radar'
}

export const getWidgetMask = (gadgetType) => {
  return `${base}${widgetMasks[gadgetType]}.png`
}

export const assetsIntegration = {
  Dashboards: '1547416321456414721',
  Datasets: '1547416747924856834',
  Widgets: '1547417061956591617',
  Bots: '1547417402425024513'
}

export const assetsFields = {
  Report_count: {
    value:'Dashboards',
    sort:0
  },
  Widget_count: {
    value:'Widgets',
    sort:1
  },
  Dataset_count: {
    value:'Datasets',
    sort:3
  },
  Bot_count: {
    value:'Bots',
    sort:2
  }
}

export const widgetTypes = Object.freeze(useWidgetType())
